package com.quan.elastic.job.simple;

import org.springframework.beans.factory.annotation.Autowired;

import com.quan.elastic.job.handler.ElasticJobHandler;


/**
 * 定时作业测试
 * 1、需要安装Zookeeper
 * 2、配置application.yml，增加如下
 * 	      elasticjob: 
 * 				zookeeper: 
 *   				serverlists: 127.0.0.1:2181
 *   				namespace: elastic-job-meituan_quan-boot
 * @author yhaoquan
 *
 */
public class AddAndStartJobTest {
	
	@Autowired
	private ElasticJobHandler elasticJobHandler ;
	
	public void start() {
		
		this.elasticJobHandler.addJob("作业名称", "定时运行作业表达式", 1, SimpleElasticJob.class, "参数");
		
	}

}
